package com.lplb.common.log.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试日志是否正常写入
 * @author wang-song
 * @mail 1720696548@qq.com
 * @date 2020/7/14 0014 11:50 
 * @version 1.0.0
 */
@RestController
@Slf4j
@Api("测试")
public class LogTest {


    /**
     * http://localhost:8080/test
     * @author wang-song 
     * @date 2020/7/14 0014 11:50
     * @return void
     * @version 1.0.0
     */
    @GetMapping("/test")
    @ApiOperation("测试日志")
    public void test(Integer num) {
        log.info("输出内容Main线程：userId:{} userName :{} age:{}", 1, "wangsong", 22);
        new Thread(() -> {
            log.info("输出内容B线程：userId:{} userName :{} age:{}", 2, "erping", 26);
        }).start();
        int i = 1 / 0;
    }
}
